<?php 

echo $this->element('top_menu', array('auth', $auth));

?>



<h1>Gruppi</h1>

<form action="/test_1/groups/add" method="post">
	
	<table>
	    <tr>
	        <th>Id</th>
	        <th>Descrizione</th>
	    </tr>
	    <!-- Here is where we loop through our $posts array, printing out post info -->
		<?php foreach ($groups as $group): ?> 
		<tr>
			<td><?php echo $this->Html->link($group['Group']['id'], array('controller' => 'groups', 'action' => 'edit', $group['Group']['id'])); ?></td>
			<td><?php echo $group['Group']['descrizione']; ?></td> 
			<td><?php echo $this->Html->link('X', array('controller' => 'groups', 'action' => 'delete', $group['Group']['id'])); ?></td>
		</tr>
		<?php endforeach; ?>
		<?php unset($groups); ?> 
	</table>

	<input type="submit" value="Aggiungi" onclick="formSubmit('true','/test_1/users/add');" />
</form>